<?php

namespace common\models\qywx;

use Yii;

/**
 * This is the model class for table "qywx_access_token".
 *
 * @property integer $id
 * @property integer $app_id
 * @property string $val
 * @property integer $expires_in
 * @property integer $status
 * @property string $errcode
 * @property string $errmsg
 * @property string $memo
 * @property string $created_by
 * @property string $created_at
 * @property string $updated_by
 * @property string $updated_at
 */
class QywxAccessToken extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'qywx_access_token';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['app_id', 'expires_in', 'status'], 'integer'],
            [['created_at', 'updated_at'], 'safe'],
            [['val', 'errmsg'], 'string', 'max' => 255],
            [['errcode', 'created_by', 'updated_by'], 'string', 'max' => 45],
            [['memo'], 'string', 'max' => 2048],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => Yii::t('app', 'ID'),
            'app_id' => Yii::t('app', 'App ID'),
            'val' => Yii::t('app', 'Val'),
            'expires_in' => Yii::t('app', 'Expires In'),
            'status' => Yii::t('app', 'Status'),
            'errcode' => Yii::t('app', 'Errcode'),
            'errmsg' => Yii::t('app', 'Errmsg'),
            'memo' => Yii::t('app', 'Memo'),
            'created_by' => Yii::t('app', 'Created By'),
            'created_at' => Yii::t('app', 'Created At'),
            'updated_by' => Yii::t('app', 'Updated By'),
            'updated_at' => Yii::t('app', 'Updated At'),
        ];
    }
}
